Enumeration is the key to the kingdom. In this lab, we dive deep into the SMB protocol to discover hidden shares, users, and potential entry points. 🛡️
enum4linuxThe first step was running a full scan using enum4linux to see what the target machine was hiding.
Command Structure: enum4linux [OPTIONS] [IP]
enum4linux Flags| Tag | Function |
|---|---|
| -U | Get userlist |
| -M | Get machine list |
| -N | Get namelist dump (different from -U and -M) |
| -S | Get sharelist |
| -P | Get password policy information |
| -G | Get group and member list |
| -a | All of the above (full basic enumeration) |
My Action: I ran enum4linux -a 10.113.134.237 and found these key details:
Nbtstat Information" (e.g., POLOSMB).smbclientTo enter the shared folders, we need a client. Linux uses smbclient. You need the IP, the Share name, a Username, and the Port.
Basic Syntax:
smbclient //[IP]/[SHARE] -U [USERNAME] -p [PORT]
My Action in THM:
I connected successfully without a password using:
smbclient //10.113.134.237/profiles -U cactus -p 445
Inside the share, I noticed letters next to the files. These are important:
.).Note: This exploration is continued in the next session.